<template>
    <div class="product_parameters">
        <!-- 固定上面 -->
        <div class="top">
            <!-- <img
                  src="../../assets/images/goodsDetails/叉@2x.png"
                  alt=""
                  @click="parameters"
            />-->
            <p class="title">商品参数</p>
        </div>
        <div class="space"></div>
        <div class="slide">
            <div class="parameters_info" v-for="(item,index) in attributes" :key="index">
                <h1 class="describe">{{item.title}}</h1>
                <div class="content">
                    <p v-for="(items,index1) in item.data" :key="index1">{{items}}{{ (index1 + 1) != item.data.length ?
                        '/' : '' }}</p>
                </div>
            </div>
        </div>

        <div class="buttons">
            <div class="product_parameters_bottom" @click="parameters">完成</div>
        </div>
    </div>
</template>

<script>
  export default {
    props: {
      attributes: Array
    },
    data() {
      return {};
    },

    methods: {
      parameters() {
        this.$emit("parameters", false);
      }
    }
  };
</script>
<style lang="scss">
    .product_parameters {
        .van-popup {
            border-radius: 5px;
        }
    }
</style>
<style lang="scss" scoped>
    .product_parameters {
        transform: inherit;
        height: 526px;
        
        .top {
            height: 53px;
            width: 100%;
            position: fixed;
            background: #fff;
            border-radius: 20px 20px 0 0;
            z-index: 20;
            max-width: 10rem;

            img {
                height: 12px;
                width: 12px;
                position: absolute;
                top: 23px;
                right: 16px;
            }

            .title {
                line-height: 53px;
                margin-left: 17px;
                margin-right: 17px;
                font-size: 15px;
                font-weight: bold;
                color: rgba(60, 60, 60, 1);
                border-bottom: 0.5px solid rgba(245, 245, 245, 1);
            }
        }

        .space {
            height: 40px;
        }

        .slide {
            overflow-y: scroll;
            // overflow-y: visible;
            height: 410px;
        }

        .parameters_info {
            margin: 30px 17px 0;
            display: flex;

            .describe {
                font-size: 13px;
                font-weight: 400;
                color: rgba(153, 153, 153, 1);
                width: 70px;
                display: inline-block;
            }

            .content {
                display: inline-block;
                width: 282px;
                padding-left: 20px;
                font-weight: normal;
            }

            p {
                // margin-left: 27px;
                font-size: 14px;
                color: rgba(47, 47, 47, 1);
          
                display: inline-block;
            }
        }

        .buttons {
            background: #fff;
            height: 63px;
            position: fixed;
            // position: absolute;
            width: 100%;
            bottom: 0;
            max-width: 10rem;
            bottom: constant(safe-area-inset-bottom);
            bottom: env(safe-area-inset-bottom);
        }

        .product_parameters_bottom {
            width: 350px;
            text-align: center;
            // position: absolute;
            // bottom: 17px;
            margin: 0 11px;
            height: 46px;
            background: #ffdd07;
            border-radius: 30px;
            color: rgba(47, 47, 47, 1);
            font-size: 14px;
            font-weight: bold;

            line-height: 46px;
        }
    }
</style>
